<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">

        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title"><span>工程信息</span><span onclick="go_to_bid_xiang()" class="colorlan" style="float: right;margin-right: 12px">查看工程概况</span></div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">工程名称</td><td id="bidname" class="tv colorlan" colspan="3"></td></tr>
                <tr><td class="tt">保函名称</td><td id="name" class="tv"></td><td class="tt">开具机构</td><td id="kaigou" class="tv"></td></tr>
                <tr><td class="tt">保函金额(元)</td><td id="money" class="tv"></td><td class="tt">开具日期</td><td id="kaidt" class="tv"></td></tr>
                <tr><td class="tt">到期日期</td><td id="daodt" class="tv"></td><td class="tt">保函状态</td><td id="baotai_name" class="tv"></td></tr>
                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>


        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>


        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;
    var pub_bidid;
    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_tou_han_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;
                var bidinfo = res.data.bidinfo;

                if(bidinfo){
                    pub_bidid = bidinfo.id
                    $("#bidname").text(bidinfo.name).click(function () {
                        openPage('../bid/show.php?id='+bidinfo.id);
                    });
                }


                $("#name").text(data.name);
                $("#kaigou").text(data.kaigou);
                $("#money").text(parseFormatNum(data.money));
                $("#kaidt").text(data.kaidt);
                $("#daodt").text(data.daodt);
                $("#baotai_name").text(data.baotai_name);
                $("#explain").text(data.explain);
                // $(".pageshowtitle").text('投标保函登记');




                public_flow_show_display(res.data.billinfo);
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('tou_han', param_id);
    });


    function go_to_bid_xiang(){
        if(pub_bidid){
            openPage('../bid/xiang.php?id='+pub_bidid);

        }else{
            facade.error("暂无工程信息");return false;
        }
    }

</script>
</body>
</html>




